# coding:utf-8
"""
@author: jing
@contact: 529548204@qq.com
@file: errormsg.py
@time: 2022/5/30 17:27
"""
from rest_framework import serializers


def erromsg(ser: serializers) -> str:
    ret = []
    for k, v in ser.errors.items():
        ret.append(f'{k}: {v[0]}')
    msg = ';'.join(ret)
    return msg
